package calendar.messages;

import calendar.*;
import edu.gmu.middleware.Message;
import edu.gmu.streams.BlockInputStream;
import edu.gmu.streams.BlockOutputStream;
import java.io.IOException;

/* this class represents a single user */
public class NotifyEvent implements Message
{
  private static final long serialVersionUID = 3475759L;

  public Event event;
  public boolean appt;

  public NotifyEvent()
  {
    event = null;
    appt  = false;
  }

  public Event getEvent()
  {
    return this.event;
  }

  public boolean getappt()
  {
    return this.appt;
  }

  public void marshal(BlockOutputStream stream) throws IOException
  {
    this.event.marshal(stream);
    stream.writeBoolean(this.appt);
  }
  public void unmarshal(BlockInputStream stream) throws IOException
  {
    this.event = new Event();
    this.event.unmarshal(stream);
    this.appt = stream.readBoolean();
  }
}
